﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ApplicationManagement.aspx.cs" 
MasterPageFile="Site.master" Title="应用管理" Inherits="WS.EKA.Web.UI.Pages.ApplicationManagement" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
<style type="text/css">
    .err_table_long { height:auto;}
    #divCreate{ width:100%; margin:10px 0 30px 10px;}
    #divCreate dd { margin:5px 0; clear:both;}
    #divCreate dd label{ float:left; width:120px;}
    #divCreate select{ width:147px;}
</style>
    <div class="main_5">
    <div class="err_table_long_bg ">
        <div class="err_table_long">
            <div class="err_table_long_title">
                <h5>
                    应用管理</h5>
            </div>

            <asp:GridView ID="gvApplication" runat="server" AutoGenerateColumns="False" 
                AutoGenerateEditButton="True" onrowcancelingedit="GridView1_RowCancelingEdit" 
                onrowediting="GridView1_RowEditing" onrowupdating="GridView1_RowUpdating" 
                Width="100%" onrowdatabound="gvApplication_RowDataBound" 
                AllowPaging="True" onpageindexchanging="gvApplication_PageIndexChanging">
                <Columns>
                    <asp:BoundField DataField="App_Code" HeaderText="代码" ReadOnly="true" />
                    <asp:TemplateField HeaderText="名称">
                        <EditItemTemplate>
                            <asp:TextBox ID="txtAppName" runat="server" Text='<%# Bind("App_Name") %>'></asp:TextBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="Label2" runat="server" Text='<%# Bind("App_Name") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    
                    <asp:TemplateField HeaderText="类型">
                        <EditItemTemplate>
                            <asp:DropDownList ID="ddlAppType" runat="server">
                                <asp:ListItem Text="办公协同" Value="1" />
                                <asp:ListItem Text="管理支撑" Value="2" />
                                <asp:ListItem Text="营运支撑" Value="3" />
                                <asp:ListItem Text="基础应用" Value="4" />
                            </asp:DropDownList>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="Label1" runat="server" Text='<%# Bind("AppTypeName") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="是否显示">
                        <EditItemTemplate>
                            <asp:DropDownList ID="ddlIsActive" runat="server">
                                <asp:ListItem Text="是" Value="y" />
                                <asp:ListItem Text="否" Value="n" />
                            </asp:DropDownList>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="Label1" runat="server" Text='<%# Bind("ActiveName") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="update_date" HeaderText="更新时间" ReadOnly="True" />
                    
                </Columns>
                    
                <PagerSettings Mode="NumericFirstLast" Position="TopAndBottom" />
                <PagerStyle HorizontalAlign="Center" />
                    
            </asp:GridView>
           
        </div>
         
    </div>
    <div class="clear">
    </div>
        <asp:LinkButton ID="lbtnCreate" runat="server" 
            style=" font-size:20px; margin:5px; font-weight:bold;" 
            onclick="lbtnCreate_Click" >新建</asp:LinkButton>
            <asp:Label ID="lblMessage" runat="server" Font-Size="20px"  ForeColor="LightGreen" Text=""></asp:Label>
        <br />
        
        <asp:PlaceHolder ID="phCreate" runat="server" Visible="false">
    <div id="divCreate">
        <dl>
            <dd><label>代码</label>
                <asp:TextBox ID="txtAppCode" runat="server"></asp:TextBox>&nbsp;
                <asp:RequiredFieldValidator ID="rfAppCode" runat="server" ForeColor="Red" ErrorMessage="*" ControlToValidate="txtAppCode"></asp:RequiredFieldValidator>
            </dd>
            <dd><label>名称</label>
                <asp:TextBox ID="txtAppName" runat="server"></asp:TextBox>&nbsp;
                <asp:RequiredFieldValidator ID="rfAppName" runat="server" ForeColor="Red" ErrorMessage="*" ControlToValidate="txtAppName"></asp:RequiredFieldValidator>
            </dd>
            <dd>
                <label>类型</label>
                <asp:DropDownList ID="ddlAppType" runat="server">
                    <asp:ListItem Text="办公协同" Value="1" />
                    <asp:ListItem Text="管理支撑" Value="2" />
                    <asp:ListItem Text="营运支撑" Value="3" />
                    <asp:ListItem Text="基础应用" Value="4" />
                </asp:DropDownList>
            </dd>
            <dd>
                <label>是否显示</label>
                <asp:DropDownList ID="ddlIsActive" runat="server">
                    <asp:ListItem Text="是" Value="y" />
                    <asp:ListItem Text="否" Value="n" />
                </asp:DropDownList>
            </dd>
            <dd>
                <label>&nbsp;</label>
                <asp:Button ID="btnSave" runat="server" Text="保存" onclick="btnSave_Click" />
                &nbsp;
                <asp:Button ID="btnCancel" runat="server" CausesValidation="false" Text="取消" onclick="btnCancel_Click" />
            </dd>
        </dl>
    </div>
    </asp:PlaceHolder>
        
</div>
</asp:Content>
